#ifndef __WIZ_DATATYPE_AUTOPTR_HPP__SHANHAOBO_19800429__
#define __WIZ_DATATYPE_AUTOPTR_HPP__SHANHAOBO_19800429__

#include "../../Base/WizBase.hpp"
#include <memory>

namespace Wiz
{
    namespace AutoPtr
    {
        template<class ElementT>
        class Type : public ::std::auto_ptr<ElementT>
        {
        private:
            typedef ElementT                    tElement;
            typedef tElement*                   tElementPtr;
            typedef Type                        tThis;
            typedef ::std::auto_ptr<ElementT>   tSuper;
        public:
            Type() : tSuper()
            {
            }

            explicit Type(tElementPtr EPtr) : tSuper(EPtr)
            {
            }

            tElementPtr GetRawPtr()
            {
                return tSuper::get();
            }

            tElementPtr GetRawPtr() const
            {
                return tSuper::get();
            }

            tElementPtr Release()
            {
                return tSuper::release();
            }

            ::Wiz::Void::Type Reset(tElementPtr EPtr = WIZ_NULLPTR)
            {
                tSuper::reset(EPtr);
            }
        }; /// end of class Type
    } /// end of namespace AutoPtr
} /// end of namespace Wiz

#endif /*__WIZ_DATATYPE_AUTOPTR_HPP__SHANHAOBO_19800429__*/
